package com.mrd.gtimp.business.entity;

import com.mrd.annotation.validation.MRDLength;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * Created by lenovo on 2017/7/7.
 * 用于记录用户是否接受短信、邮件、微信等通知服务。
 */
@Entity(name = "t_gen_user_service")
public class UserService implements Serializable {
    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "ID")
    @MRDLength(max = 32)
    private String id;

    @Column(name = "user_id")
    @MRDLength(max = 32)
    private String userId;
    /**
     * 短信息 SMS
     * 微信 WeChat
     */
    @Column(name = "server_type")
    @MRDLength(max = 32)
    private String serverType;
    /**
     * 0 未验证
     * 1 已验证
     */
    @Column(name = "verified")
    @MRDLength(max = 10)
    private String verified;
    /**
     * 设备值，如手机号、微信openid
     */
    @Column(name = "device_code")
    private String deviceCode;
    /**
     * 0 停用
     * 1 启用
     */
    @Column(name = "status")
    private String status;

    @Column(name = "creator")
    private String creator;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "modifier")
    private String modifier;

    @Column(name = "modify_time")
    private Date modifyTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getServerType() {
        return serverType;
    }

    public void setServerType(String serverType) {
        this.serverType = serverType;
    }

    public String getVerified() {
        return verified;
    }

    public void setVerified(String verified) {
        this.verified = verified;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public String toString() {
        return "UserService{" +
                "id='" + id + '\'' +
                ", userId='" + userId + '\'' +
                ", serverType='" + serverType + '\'' +
                ", verified='" + verified + '\'' +
                ", deviceCode='" + deviceCode + '\'' +
                ", status='" + status + '\'' +
                ", creator='" + creator + '\'' +
                ", createTime=" + createTime +
                ", modifier='" + modifier + '\'' +
                ", modifyTime=" + modifyTime +
                '}';
    }
}
